package com.iptv.grape.event.msg;

// 点播播放记录返回消息
public class AssetPlayDataMsg implements Comparable<AssetPlayDataMsg>{

    // 资产ID
    private String assetID;
    // 资产ID
    private String resourcesID;
    // 剧集ID
    private String subAssetID;
    // 资产编码
    private String code;
    // 资产名字
    private String name;
    // 资产类型
    private String type;
    // 资产类型
    private String resourcesType;

    // 海报URL
    private String poster;

    // 最后一次播放时间
    private long startTime;
    // 组后一次播放进度度
    private long speedTime;

    public long getSpeedTime() {
        return speedTime;
    }

    public void setSpeedTime(long speedTime) {
        this.speedTime = speedTime;
    }

    public String getAssetID() {
        return assetID;
    }

    public void setAssetID(String assetID) {
        this.assetID = assetID;
    }

    public String getResourcesID() {
        return resourcesID;
    }

    public void setResourcesID(String resourcesID) {
        this.resourcesID = resourcesID;
    }

    public String getSubAssetID() {
        return subAssetID;
    }

    public void setSubAssetID(String subAssetID) {
        this.subAssetID = subAssetID;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getResourcesType() {
        return resourcesType;
    }

    public void setResourcesType(String resourcesType) {
        this.resourcesType = resourcesType;
    }

    public String getPoster() {
        return poster;
    }

    public void setPoster(String poster) {
        this.poster = poster;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    @Override
    public int compareTo(AssetPlayDataMsg assetPlayDataMsg) {
        if(this.startTime == assetPlayDataMsg.startTime){
            return 0;
        }
        if(this.startTime > assetPlayDataMsg.startTime){
            return -1;
        }
        return 1;
        //return ((int)(this.startTime - assetPlayDataMsg.startTime));
    }
}
